# -*- coding: utf-8 -*-
"""
Created on Thu Sep 19 10:55:45 2019

@author: Administrator
"""

# 1026
# python 四舍五入：round()意义不大


def test():
    raw = str(input()).split(' ')
    
    
    diff = int(raw[1]) - int(raw[0])
    time = diff / 100
    time_no_frac = diff // 100
    fraction = time - time_no_frac
    if fraction < 0.5:
        time = time_no_frac
    else:
        time = time_no_frac + 1
        
    base = 60
    minutes, a = divmod(time, base) 
    hours, b = divmod(minutes, base)
    
    print("%s:%s:%s" %  \
          (str(hours).zfill(2), str(b).zfill(2), str(a).zfill(2)))
    
test()
